package com.his.registration.service.impl;

import com.his.dto.CheckCharge;
import com.his.dto.CheckResult;
import com.his.registration.mapper.CheckRequestMapper;
import com.his.registration.pojo.CheckRequest;
import com.his.registration.service.CheckRequestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @BelongsProject: workspace-idea
 * @BelongsPackage: com.his.registration.service.impl
 * @Author: ZhangYing
 * @Date: 2023/7/2 15:51
 * @Description:
 */
@Service
public class CheckRequestServiceImpl implements CheckRequestService {
    @Autowired
    private CheckRequestMapper checkRequestMapper;
    @Override
    public List<CheckCharge> getCheckFee(int registerId) {
        return checkRequestMapper.getCheckFee(registerId);
    }

    @Override
    public int charge(String drugState,int id) {
        return checkRequestMapper.charge(drugState,id);
    }

    @Override
    public int insert(int registerId, int medicalTechnologyId, LocalDateTime creationTime, String checkState) {
        return checkRequestMapper.insert(registerId,medicalTechnologyId,creationTime,checkState);
    }

    @Override
    public int getInsertId() {
        return checkRequestMapper.getInsertId();
    }

    @Override
    public CheckRequest selectById(int id) {
        return checkRequestMapper.selectById(id);
    }

    @Override
    public int updateOthers(int id,String checkInfo, String checkPosition, String checkRemark) {
        return checkRequestMapper.updateOthers(id,checkInfo,checkPosition,checkRemark);
    }

    @Override
    public int deleteById(int id) {
        return checkRequestMapper.deleteById(id);
    }

    @Override
    public List<CheckResult> getCheckByRegisterId(int registerId) {
        return checkRequestMapper.getCheckByRegisterId(registerId);
    }
}
